package org.ziyuandagong.file.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.sql.Blob;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author 自愿打工
 * @since 2024-12-06
 */
@TableName("file_chunk")
@ApiModel(value = "Chunk对象", description = "")
public class Chunk implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("分片唯一标识符")
    private String chunkId;

    @ApiModelProperty("所属文件的ID")
    private String fileId;

    @ApiModelProperty("分片编号")
    private Integer chunkNumber;

    @ApiModelProperty("分片数据内容")
    private Blob chunkData;

    @ApiModelProperty("分片大小")
    private Integer chunkSize;

    @ApiModelProperty("是否上传完成")
    private Boolean isUploaded;

    public String getChunkId() {
        return chunkId;
    }

    public void setChunkId(String chunkId) {
        this.chunkId = chunkId;
    }
    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }
    public Integer getChunkNumber() {
        return chunkNumber;
    }

    public void setChunkNumber(Integer chunkNumber) {
        this.chunkNumber = chunkNumber;
    }
    public Blob getChunkData() {
        return chunkData;
    }

    public void setChunkData(Blob chunkData) {
        this.chunkData = chunkData;
    }
    public Integer getChunkSize() {
        return chunkSize;
    }

    public void setChunkSize(Integer chunkSize) {
        this.chunkSize = chunkSize;
    }
    public Boolean getIsUploaded() {
        return isUploaded;
    }

    public void setIsUploaded(Boolean isUploaded) {
        this.isUploaded = isUploaded;
    }

    @Override
    public String toString() {
        return "Chunk{" +
            "chunkId=" + chunkId +
            ", fileId=" + fileId +
            ", chunkNumber=" + chunkNumber +
            ", chunkData=" + chunkData +
            ", chunkSize=" + chunkSize +
            ", isUploaded=" + isUploaded +
        "}";
    }
}
